import {GET_CATEGORY_DATA} from './actionTypes'
const defaultState = {
    categorys: {}
}
/**
 * 数据统一使用data
 * @param state
 * @param action
 * @returns {{category: {}}|{category: *{}}}
 */
export default (state=defaultState,action) => {
    switch (action.type) {
        case GET_CATEGORY_DATA:
            return {
                categorys: {...state.categorys,...action.data}
            }
        default:
            return state
    }
}
